//
//  UserInfoModel.m
//  江淮卡友
//
//  Created by LHP on 2020/12/10.
//

#import "UserInfoModel.h"

@implementation UserInfoModel
- (void)encodeWithCoder:(NSCoder *)encoder
{
    [encoder encodeObject:self.serviceStationName forKey:@"serviceStationName"];
    [encoder encodeInteger:self.identifier forKey:@"identifier"];
    [encoder encodeObject:self.loginType forKey:@"loginType"];
    [encoder encodeObject:self.userId forKey:@"userId"];
    [encoder encodeObject:self.nickname forKey:@"nickname"];
    [encoder encodeObject:self.popupEntity forKey:@"popupEntity"];
    [encoder encodeObject:self.token forKey:@"token"];
    
    [encoder encodeObject:self.accountName forKey:@"accountName"];
    [encoder encodeObject:self.name forKey:@"name"];
    [encoder encodeObject:self.signature forKey:@"signature"];
    [encoder encodeObject:self.phone forKey:@"phone"];
    [encoder encodeObject:self.role forKey:@"role"];
    [encoder encodeObject:self.otwOrderNum forKey:@"otwOrderNum"];
    [encoder encodeObject:self.orgCode forKey:@"orgCode"];
    [encoder encodeObject:self.custTag forKey:@"custTag"];
    [encoder encodeObject:self.userPicUrl forKey:@"userPicUrl"];
    [encoder encodeObject:self.realName forKey:@"realName"];
    [encoder encodeBool:self.hasBindCar forKey:@"hasBindCar"];
    [encoder encodeObject:self.isSign forKey:@"isSign"];
    [encoder encodeObject:self.ucId forKey:@"ucId"];
    [encoder encodeObject:self.startSign forKey:@"startSign"];
    [encoder encodeObject:self.cityDesc forKey:@"cityDesc"];
    [encoder encodeObject:self.provinceDesc forKey:@"provinceDesc"];
    
    
}
- (instancetype)initWithCoder:(NSCoder *)decoder
{
    if (self = [super init])
    {
        self.serviceStationName = [decoder decodeObjectForKey:@"serviceStationName"];
        self.identifier = [decoder decodeIntegerForKey:@"identifier"];
        self.loginType = [decoder decodeObjectForKey:@"loginType"];
        self.userId = [decoder decodeObjectForKey:@"userId"];
        self.nickname = [decoder decodeObjectForKey:@"nickname"];
        self.popupEntity = [decoder decodeObjectForKey:@"popupEntity"];
        self.token = [decoder decodeObjectForKey:@"token"];
        
        self.accountName = [decoder decodeObjectForKey:@"accountName"];
        self.name = [decoder decodeObjectForKey:@"name"];
        self.signature = [decoder decodeObjectForKey:@"signature"];
        self.phone = [decoder decodeObjectForKey:@"phone"];
        self.role = [decoder decodeObjectForKey:@"role"];
        self.otwOrderNum = [decoder decodeObjectForKey:@"otwOrderNum"];
        self.orgCode = [decoder decodeObjectForKey:@"orgCode"];
        self.custTag = [decoder decodeObjectForKey:@"custTag"];
        self.userPicUrl = [decoder decodeObjectForKey:@"userPicUrl"];
        self.realName = [decoder decodeObjectForKey:@"realName"];
        self.hasBindCar = [decoder decodeBoolForKey:@"hasBindCar"];
        self.isSign = [decoder decodeObjectForKey:@"isSign"];
        self.ucId = [decoder decodeObjectForKey:@"ucId"];
        self.startSign = [decoder decodeObjectForKey:@"startSign"];
        self.cityDesc = [decoder decodeObjectForKey:@"cityDesc"];
        self.provinceDesc = [decoder decodeObjectForKey:@"provinceDesc"];
    }
    return self;
}

+(NSDictionary *)mj_replacedKeyFromPropertyName
{
    // 实现这个方法的目的：告诉MJExtension框架模型中的属性名对应着字典的哪个key
    return @{@"identifier":@"id"};
}
@end
